package com.difsonapps.android.marker.beans.facebook;

import android.os.Parcel;
import android.os.Parcelable;

public class Album  implements Parcelable{
	private int id;
	private String fid;
	private boolean cheched = true;

	private String name = "";
	private String description = "";
	private String location = "";
	private String link = "";
	private Integer count = 0;
	private int countUploaded = 0;

	private String privacy = "";
	private String coverPhotoId = "";
	private String coverPhotoSrc = "";//Only defined when loaded
	private String type = "";
	private long createdTime=0;
	private long updatedTime=0;
	private int status = STATUS_CREATED;
	public static final int STATUS_CREATED = 0;
	public static final int STATUS_STARTED = 1;
	public static final int STATUS_PENDING = 2;
	public static final int STATUS_IMPORTED = 3;
	public static final int STATUS_FAILED = 4;
	
	
	public Album(com.sromku.simple.fb.entities.Album albumFbk) {
		this();
		fid = albumFbk.getId();
		name = albumFbk.getName();
		description = albumFbk.getDescription();
		location = albumFbk.getLocation();
		link = albumFbk.getLink();
		count = albumFbk.getCount();
		privacy = albumFbk.getPrivacy();
		coverPhotoId = albumFbk.getCoverPhotoId();
		type = albumFbk.getType();
		createdTime = albumFbk.getCreatedTime();
		updatedTime = albumFbk.getUpdatedTime();
	}
	
	public Album() {
		super();
	}
	public Album(String fid, String name, String description, String coverPhotoId, Integer count) {
		this();
		this.fid = fid;
		this.name = name;
		this.description = description;
		this.coverPhotoId = coverPhotoId;
		this.count = count;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getFid() {
		return fid;
	}
	public void setFid(String fid) {
		this.fid = fid;
	}
	public boolean isCheched() {
		return cheched;
	}

	public void setCheched(boolean cheched) {
		this.cheched = cheched;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	public int getCountUploaded() {
		return countUploaded;
	}
	public void setCountUploaded(int countUploaded) {
		this.countUploaded = countUploaded;
	}
	public String getPrivacy() {
		return privacy;
	}
	public void setPrivacy(String privacy) {
		this.privacy = privacy;
	}
	public String getCoverPhotoId() {
		return coverPhotoId;
	}
	public void setCoverPhotoId(String coverPhotoId) {
		this.coverPhotoId = coverPhotoId;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public long getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(long createdTime) {
		this.createdTime = createdTime;
	}
	public long getUpdatedTime() {
		return updatedTime;
	}
	public void setUpdatedTime(long updatedTime) {
		this.updatedTime = updatedTime;
	}
	
	public String getCoverPhotoSrc() {
		return coverPhotoSrc;
	}
	public void setCoverPhotoSrc(String coverPhotoSrc) {
		this.coverPhotoSrc = coverPhotoSrc;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	@Override
	public int describeContents() {
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(id);
		dest.writeString(fid);
		dest.writeString(name);
		dest.writeString(description);
		dest.writeString(location);
		dest.writeString(link);
		dest.writeInt(count);
		dest.writeInt(countUploaded);
		dest.writeString(privacy);
		dest.writeString(coverPhotoId);
		dest.writeString(type);
		dest.writeLong(createdTime);
		dest.writeLong(updatedTime);
		dest.writeString(coverPhotoSrc);
		dest.writeInt(status);
	}
	
	public Album(Parcel in){
		this();
		this.id = in.readInt();
		this.fid = in.readString();
		this.name = in.readString();
		this.description = in.readString();
		this.location = in.readString();
		this.link = in.readString();
		this.count = in.readInt();
		this.countUploaded = in.readInt();
		this.privacy = in.readString();
		this.coverPhotoId = in.readString();
		this.type = in.readString();
		this.createdTime = in.readLong();
		this.updatedTime = in.readLong();
		this.coverPhotoSrc = in.readString();
		this.status = in.readInt();
	}

	public static final Parcelable.Creator<Album> CREATOR = new
		Parcelable.Creator<Album>() {
			@Override
			public Album createFromParcel(Parcel source) {
				return new Album(source);
			}
			@Override
			public Album[] newArray(int size) {
				return new Album[size];
		}
	};

}
